home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1996 June / EnigmA AMIGA RUN 08 (1996)(G.R. Edizioni)(IT)[!][issue 1996-06][EARSAN CD VII].iso / earcd / comm1 / s2mtr376.lha / SANA2Meter / Install < prev    next >
Text File  |  1996-04-27  |  11KB  |  350 lines

  1. ;
  2. ; $VER: install 34.2 (24 Apr 1996)
  3. ;
  4. ; Installer script for SANA2Meter package.
  5. ;
  6. ; (C) Copyright 1996 Marius Gröger
  7. ;     All Rights Reserved.
  8. ;
  9. ; $HISTORY:
  10. ;
  11.  
  12. (set #cpu (database "cpu"))
  13. (set #level @user-level)
  14. (set #programdrawer "SANA2Meter")
  15. (set #program "SANA2Meter")
  16. (set #programdir "Bin")
  17. (set #helpdir "Help")
  18. (set #helpfile "SANA2Meter.guide")
  19. (set #catdir "Catalogs")
  20. (set #defcatinstalldir1 "LOCALE:")
  21. (set #mwbicons "Icons/MagicWB")
  22. (set #stdicons "Icons/Standard")
  23. (set #definstallprogramdir "AMITCP:")
  24.  
  25. ; -------------------------- Installation mode ---------------------------
  26.  
  27. (complete 0)
  28.  
  29. ; (The installer documentation says not to use this call
  30. ; final distribtions, but I know no way to let the next decision
  31. ; popping up in novice mode. If you do, please mail to
  32. ; mag@sysgo.de. Thanks.)
  33. (user 2)
  34. (set mode
  35.    (askoptions
  36.        (prompt "Which parts should be installed ?")
  37.        (choices "SANA2Meter program" "AmigaGuide documentation")
  38.        (help @askoptions-help)
  39.        (default 3)
  40.    )
  41. )
  42. (user #level)
  43.  
  44. (complete 5)
  45.  
  46. (if (= mode 0)
  47.    (
  48.       (message "\n\n"\
  49.                "You have nothing selected---Probably you had quite a hard day today. "\
  50.                "Maybe it's better to try again tomorrow morning."
  51.       )
  52.       (exit (quiet))
  53.    )
  54. )
  55.  
  56. (set #installprogram (IN mode 0))
  57. (set #installguide (IN mode 1))
  58.  
  59. (complete 10)
  60.  
  61. ; -------------------------- Installation setup ---------------------------
  62.  
  63. (if #installprogram
  64.    (
  65.       (set #installprogramdir
  66.          (tackon
  67.             (askdir
  68.                (prompt "Please locate the installation directory:\n"\
  69.                        "(A drawer \"" #programdrawer "\" will be created there)")
  70.                (help @askdir-help)
  71.                (default #definstallprogramdir)
  72.             )
  73.             #programdrawer
  74.          )
  75.       )
  76.       (if (= 1 (exists (tackon #installprogramdir #program) (noreq)))
  77.          (
  78.             (user 2)
  79.             (set #update
  80.                (askbool
  81.                    (prompt "\n\nThere is an older version of " #program " installed. "\
  82.                            "Do you want to keep the old icon and it's tooltype settings?"
  83.                            )
  84.                    (help (cat "Selecting \"Yes\" will only update the program code but "\
  85.                               "won't touch the icon, thus preserving it's tooltype settings.\n\n"\
  86.                               "Selecting \"No\" will do normal installation.\n\n"
  87.                          @askbool-help))
  88.                )
  89.             )
  90.             (user #level)
  91.          )
  92.       )
  93.  
  94. (complete 15)
  95.       ; ---------------------------------------------------------------------
  96.       (foreach #catdir "#?" (set #catchoices (cat #catchoices @each-name)))
  97.       (user 2)
  98.       (set #catalogs
  99.          (askoptions
  100.              (prompt "Which language catalogs should be installed?\n"
  101.                      "The built-in default language is english.")
  102.              (choices #catchoices)
  103.              (help @askoptions-help)
  104.              (default 1)
  105.          )
  106.       )
  107.       (user #level)
  108. (complete 20)
  109.       (if #catalogs
  110.          (
  111.             (set #wherecat
  112.                (askchoice
  113.                   (prompt "Please locate the destination directory for the catalog file(s):\n"\
  114.                           "(Non-existing drawers will be created when neccessary)")
  115.                   (choices (tackon #defcatinstalldir1 "Catalogs/")
  116.                            (tackon #installprogramdir "Catalogs/")
  117.                   )
  118.                   (help (cat "If you decide for the suggested default setting, the locale catalog(s) "\
  119.                              "will be copied right beside the program file. This avoids overflowing "
  120.                              "system locale catalog directories.\n\n"
  121.                              @askchoice-help
  122.                         )
  123.                   )
  124.                   (default 1)
  125.                )
  126.             )
  127.             (set #installcatdir (select #wherecat #defcatinstalldir1 #installprogramdir))
  128.          )
  129.       )
  130. (complete 25)
  131.       ; ---------------------------------------------------------------------
  132.       (set #proc
  133.         (askchoice
  134.            (prompt (cat "There are diffent versions of \"" #program "\", each one optimized "
  135.                         "for a specific CPU type.\n"
  136.                         "Please select one: "))
  137.            (choices  "MC68000"
  138.                      "MC68020"
  139.                      "MC68040"
  140.            )
  141.            (help (cat "  Select here the CPU type that is installed in your system. "
  142.                  "\n\n  Currently, this is a MC" #cpu ".\n\n  If you select a certain CPU type "
  143.                  "in the choice box, \"" #program "\" will run on any CPU which "
  144.                  "type is higher or equal to the selection. However, it won't "
  145.                  "run on a system equipped with a lower type.\n\n"
  146.                  @askchoice-help)
  147.            )
  148.            (default 0)
  149.         )
  150.       )
  151. (complete 30)
  152.       ; ---------------------------------------------------------------------
  153.       (if (NOT #update)
  154.          (
  155.             (user 2)
  156.             (set #device
  157.                (select
  158.                   (askchoice
  159.                           (prompt "Which SANA-II network are you using?")
  160.                           (choices  "none of the listed"
  161.                                     "magPLIP"
  162.                                     "SLIP"
  163.                                     "CSLIP"
  164.                                     "rhSLIP"
  165.                                     "rhCSLIP"
  166.                                     "PPP"
  167.                                     "A2060"
  168.                                     "A2065"
  169.                                     "RS485"
  170.                                     "AX25"
  171.                           )
  172.                           (help (cat "You should select the device you are using most frequently. "\
  173.                                      "It will then be entered in the tooltype list of " #program ".\n\n"
  174.                                      @askchoice-help
  175.                                 )
  176.                           )
  177.                           (default 0)
  178.                   )
  179.                   "<none>"
  180.                   "magplip.device"
  181.                   "slip.device"
  182.                   "cslip.device"
  183.                   "rhslip.device"
  184.                   "rhcslip.device"
  185.                   "ppp.device"
  186.                   "a2060.device"
  187.                   "a2065.device"
  188.                   "rs485.device"
  189.                   "ax25.device"
  190.             ))
  191.             (user #level)
  192.          )
  193.       )
  194.    )
  195. )
  196.  
  197. (complete 35)
  198.  
  199. (if #installguide
  200.    (set #installhelpdir
  201.       (askdir
  202.          (prompt "Please locate the directory for AmigaGuide-Documents:")
  203.          (help (cat "Select here the directory where you keep your "\
  204.                     "AmigaGuide online help documents.\n\n"
  205.                      @askdir-help
  206.                )
  207.          )
  208.          (newpath)
  209.          (default #installprogramdir)
  210.       )
  211.    )
  212. )
  213.  
  214. (complete 40)
  215.  
  216. (user 2)
  217. (set #iconkind
  218.    (askchoice
  219.            (prompt "Which flavour of icons do you want to install?")
  220.            (choices  "4-Color Standard"
  221.                      "8-Color MagicWB"
  222.            )
  223.            (help @askchoice-help)
  224.            (default 0)
  225.    )
  226. )
  227. (set #magicwb (= 1 #iconkind))
  228. (user #level)
  229.  
  230.  
  231. ; ------------------------- Program Installation --------------------------
  232.  
  233. (complete 45)
  234.  
  235. (if (= 0 (exists #installprogramdir (noreq))) (makedir #installprogramdir (infos)))
  236.  
  237. (complete 50)
  238.  
  239. (if #installprogram
  240.    (
  241.       (copyfiles
  242.          (prompt (cat "Copying the program"))
  243.          (help @copyfiles-help)
  244.          (source (cat (tackon #programdir #program)
  245.                     (if (= 0 #proc) ".000")
  246.                     (if (= 1 #proc) ".020")
  247.                     (if (= 2 #proc) ".040")
  248.          ))
  249.          (dest #installprogramdir)
  250.          (newname #program)
  251.          (confirm)
  252.       )
  253. (complete 55)
  254.       (if (NOT #update)
  255.          (copyfiles
  256.                  (prompt "Copying Icon")
  257.                  (help @copyfiles-help)
  258.                  (source (tackon
  259.                        (if #magicwb #mwbicons #stdicons)
  260.                        "Program.info")
  261.                  )
  262.                  (dest #installprogramdir)
  263.                  (newname (cat #program ".info"))
  264.                  (confirm)
  265.          )
  266.       )
  267. (complete 60)
  268.       (protect (tackon #installprogramdir #program) "prwed")
  269. (complete 65)
  270.       (if (NOT #update)
  271.          (tooltype
  272.                  (prompt "\n\nInitialising the icon's device information")
  273.                  (help @tooltype-help)
  274.                  (dest (tackon #installprogramdir #program))
  275.                  (settooltype "DEVICE" (tackon "devs:networks" #device))
  276.                  (confirm)
  277.          )
  278.       )
  279. (complete 70)
  280.       (if #catalogs
  281.          (
  282.             (set #mask 1)
  283.             (set #installcatdir (tackon #installcatdir "Catalogs"))
  284.             (set #catname (cat #program ".catalog"))
  285.             (makedir #installcatdir)
  286.             (foreach #catdir "#?"
  287.                (
  288.                   (if (AND #catalogs #mask)
  289.                      (
  290.                         (makedir (tackon #installcatdir @each-name))
  291. (complete 75)
  292.                         (copyfiles
  293.                            (prompt (cat "Copying the \"" @each-name "\" catalog"))
  294.                            (help @copyfiles-help)
  295.                            (source (tackon (tackon #catdir @each-name) #catname))
  296.                            (dest (tackon #installcatdir @each-name))
  297.                            (confirm)
  298.                         )
  299.                      )
  300.                   )
  301.                   (set #mask (shiftleft #mask 1))
  302.                )
  303.             )
  304.          )
  305.       )
  306.    )
  307. )
  308.  
  309. (complete 80)
  310.  
  311. ; ------------------------- Guide Installation --------------------------
  312.  
  313. ; install AmigaGuide file
  314. (if #installguide
  315.    (
  316.       (copyfiles
  317.               (prompt "Copying AmigaGuide file")
  318.               (help @copyfiles-help)
  319.               (source (tackon #helpdir #helpfile))
  320.               (dest #installhelpdir)
  321.               (confirm)
  322.       )
  323. (complete 85)
  324.       (copyfiles
  325.               (prompt "Copying Icon")
  326.               (help @copyfiles-help)
  327.               (source (tackon
  328.                     (if #magicwb #mwbicons #stdicons)
  329.                     "AmigaGuide.info")
  330.               )
  331.               (dest #installhelpdir)
  332.               (newname (cat #helpfile ".info"))
  333.               (confirm)
  334.       )
  335.    )
  336. )
  337.  
  338. (complete 100)
  339.  
  340. (user 2)
  341. (message "\n\nInstallation completed!\n" @app-name " can be found in your \""
  342.          #installprogramdir "\" drawer (or partition).\n\n"
  343.          "You should view the tooltypes of \"" #program
  344.          "\" to check whether they meet your configuration.\n\n"
  345.          "Enjoy!"
  346. )
  347. (user #level)
  348. (exit (quiet))
  349.  
  350.